<html>

<#include "../common/head.ftl">

<body>
<div id="wrapper" class="toggled">

    <#include "../common/nav.ftl">

    <div id="page-content-wrapper">
        <div class="container-fluid">
            <div class="row clearfix">
                <div class="col-md-12 column">
                    <form role="form" method="post" action="/seller/product/save">
                        <div class="form-group">
                            <label>名称</label>
                            <input name="productName" value="${(productInfo.getProductName())!''}" type="text" class="form-control"/>
                        </div>
                        <div class="form-group">
                            <label>价格</label>
                            <input name="productPrice" value="${(productInfo.getProductPrice())!''}" type="text" class="form-control"/>
                        </div>
                        <div class="form-group">
                            <label>库存</label>
                            <input name="productStock" value="${(productInfo.getProductStock())!''}" type="number" class="form-control"/>
                        </div>
                        <div class="form-group">
                            <label>描述</label>
                            <input name="productDescription" value="${(productInfo.getProductDescription())!''}" type="text" class="form-control"/>
                        </div>
                        <div class="form-group">
                            <label>图片</label>
                            <img height="200" width="200" src="${(productInfo.getProductIcon())!''}">
                            <input name="productIcon" value="${(productInfo.getProductIcon())!''}" type="text" class="form-control"/>
                        </div>
                        <div class="form-group">
                            <label>类目</label>
                            <select name="categoryType" class="form-control">
                                <#list productCategoryList as productCategory>
                                    <option value="${productCategory.getCategoryType()}"
                                        <#if (productInfo.getCategoryType())?? && productCategory.getCategoryType() == productInfo.getCategoryType()>
                                            selected
                                        </#if>
                                    >
                                        ${productCategory.getCategoryName()}
                                    </option>
                                </#list>
                            </select>
                        </div>
                        <input type="text" name="productId" value="${(productInfo.getProductId())!''}" hidden>
                        <button type="submit" class="btn btn-default">提交</button>
                    </form>
                </div>
            </div>
        </div>
    </div>

</div>
</body>
</html>